#include "TextDownButtonListener.h"

TextDownButtonListener::TextDownButtonListener(
		std::list<TextScrollBarElement*> *elements) {
	this->elements = elements;
}

TextDownButtonListener::TextDownButtonListener() {

}

TextDownButtonListener::~TextDownButtonListener() {
	this->elements = NULL;
}

void TextDownButtonListener::execute() {
	if (this->elements->back()->isVisible()) {
		return;
	}

	TextScrollBarElement* aux = NULL;
	for (this->it_element = this->elements->begin(); this->it_element
			!= this->elements->end(); ++this->it_element) {
		aux = (TextScrollBarElement*) *it_element;
		aux->up();
	}
}
